<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>运算符演示页面</title>
</head>
<body>
<div>
    算术运算符:
    <p>加法计算结果是: <span th:text="${a}+${b}"></span> </p>
    <p>减法计算结果是:<span th:text="${a}-${b}"></span></p>
    <p>乘法计算结果是:<span th:text="${a}*${b}"></span></p>
    <p>除法计算结果是:<span th:text="${a}div${b}"></span></p>
    <p>取模计算结果是:<span th:text="${a}mod${c}"></span></p>

</div>
<br>
<div>
    比较运算符:
    <p th:if="${a}>${b}">a > b </p>
    <p th:if="${a}<${b}">a < b </p>
    <p th:if="${a}==${b}">a = b </p>
    <p th:if="${a}!=${b}">a != b </p>

</div>
<br>
<div>
    条件表达式运算符:
    <p th:text="${a} &gt; ${b} ? 'a':'b'"></p>
    <p th:text="${a} > ${b} ? 'a':'b'"></p>
</div>
<br>
<div>
    逻辑运算:
    <p th:if="${a}> ${b} and ${a}mod ${c}==0">a > b,并且a是偶数</p>
    <p th:if="${a}> ${b} and ${a}mod ${c}==1">a > b,并且a是奇数</p>
</div>
<br>
<div>
    默认表达式运算:
    <p th:text="${student.sid} ?: 'Invalid ID'"></p>
</div>
<br>

</body>
</html>